import requests

# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    # url = 'https://srsc.gdedu.gov.cn/srsc/genVerifyCode?d=1603692884723'
    # response = requests.get(url)
    # img = response.content
    # with open('./a.jpg', 'wb') as f:
    #     f.write(img)
    res = requests.get('https://srsc.gdedu.gov.cn/srsc/login/login.jsp?fromUrl=https%3A%2F%2Fsrsc.zsgen.com%2Fnewhome%2Fhome#')
    print(res.cookies.domain_re)
    print(res.headers)
    ck = res.cookies
    print(ck.get_dict('srsc.gdedu.gov.cn').get('JSESSIONID'))